from django.db import models

class Student(models.Model):
    name = models.CharField(max_length=32,blank=False,verbose_name="学生信息", help_text="学生信息")
    GENDER_TYPE = (
        ('0', "男"),
        ('1', "女"),
    )    
    gender = models.CharField(max_length=1,choices=GENDER_TYPE, verbose_name="性别", null=True, blank=True, help_text="性别")
    age = models.IntegerField(blank=False,verbose_name="年龄", help_text="年龄")
    id_card = models.CharField(max_length=18,blank=False,verbose_name="身份证号", help_text="身份证号")
    phone = models.CharField(max_length=256,blank=False,verbose_name="手机号码", help_text="手机号码")
    address = models.CharField(max_length=256,blank=False,verbose_name="家庭地址", help_text="家庭地址")

    class Meta:
        db_table = "myweb_student"                                  
        verbose_name = "学生信息表"                             
        verbose_name_plural = verbose_name                                  
        ordering = ('id',)